﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackOff
{
    public class TimeLeftResult
    {
        public TimeLeftResult(int totalSeconds)
        {
            this.Seconds = totalSeconds % 60;
            this.Minutes = (totalSeconds - this.Seconds) / 60;
            this.TotalSeconds = totalSeconds;
            this.IsOver = totalSeconds <= 0;
        }

        public int Minutes { get; private set; }

        public int Seconds { get; private set; }

        public int TotalSeconds { get; private set; }

        public bool IsOver { get; private set; }

        public override string ToString()
        {
            return $"{this.Minutes}:{this.Seconds.ToString("D2")}";
        }
    }
}
